import React from 'react';
import { Player } from 'video-react';

class VideoPlayer extends React.Component<any, any> {
    constructor(props: any) {
        super(props);
        this.state = {
            loading: false,
            record: {}
        }
    }
    componentDidMount() {
        const { ParentData } = this.props;
        if (ParentData) {
            this.setState({ record: ParentData });
        }
    }
    render() {
        const {record}=this.state;
        return (
            <Player
                playsInline
                poster={record.imageUrl}
                src={record.videoUrl}
            />
        )
    }
}
export default VideoPlayer;